package com.itheima.day04.myinnerclass.test5;

public class Test {
    public static void main(String[] args) {
        goSwimming(new Swimming() {
            @Override
            public void swim() {
                System.out.println("铁子，我们去游泳吧！");
            }
        });
        goSwimming(new Swimming() {
            @Override
            public void swim() {
                System.out.println("去洗脚");
            }
        });

        goSwimming(() ->
        { System.out.println("函数式编程思想");
        });
        goSwimming(() ->
                System.out.println("这个好，搞得我好乱")
        );

    }

    public static void goSwimming(Swimming swimming) {
        swimming.swim();
    }

}

interface Swimming {
    void swim();
}
